package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import javax.validation.constraints.Size;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;

@Entity
@Table(name = "sys_corp")
@GenericGenerator(name = "uuid2", strategy = "com.ruoyi.common.utils.IDUtils")
public class SysCorp extends BaseEntity {
    @Id
    @Size(max = 19)
    @Column(name = "pk_corp", nullable = false, length = 19, columnDefinition = "char")
    @GeneratedValue(generator = "uuid2")
    private String pkCorp;

    @Size(max = 50)
    @Column(name = "corp_code", length = 50)
    private String corpCode;

    @Size(max = 150)
    @Column(name = "corp_name", length = 150)
    private String corpName;

    @Size(max = 20)
    @Column(name = "taxpayerid", length = 20)
    private String taxpayerid;

    @Size(max = 19)
    @Column(name = "pk_fathercorp", length = 19, columnDefinition = "char")
    private String pkFathercorp;

    @Column(name = "enablestate", columnDefinition = "char(1)")
    private String enablestate;

    @Column(name = "del_flag", columnDefinition = "char(1)")
    private String delFlag;

    @Size(max = 50)
    @Column(name = "leader", length = 50)
    private String leader;

    @Size(max = 20)
    @Column(name = "phone", length = 20)
    private String phone;

    @Size(max = 200)
    @Column(name = "address", length = 200)
    private String address;


    @Size(max = 500)
    @Column(name = "remark", length = 500)
    private String remark;


    @Transient
    private List<SysCorp> children = new ArrayList<SysCorp>();

    public String getPkCorp() {
        return pkCorp;
    }

    public void setPkCorp(String pkCorp) {
        this.pkCorp = pkCorp;
    }

    public String getCorpCode() {
        return corpCode;
    }

    public void setCorpCode(String corpCode) {
        this.corpCode = corpCode;
    }

    public String getCorpName() {
        return corpName;
    }

    public void setCorpName(String corpName) {
        this.corpName = corpName;
    }

    public String getTaxpayerid() {
        return taxpayerid;
    }

    public void setTaxpayerid(String taxpayerid) {
        this.taxpayerid = taxpayerid;
    }

    public String getPkFathercorp() {
        return pkFathercorp;
    }

    public void setPkFathercorp(String pkFathercorp) {
        this.pkFathercorp = pkFathercorp;
    }

    public String getEnablestate() {
        return enablestate;
    }

    public void setEnablestate(String enablestate) {
        this.enablestate = enablestate;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getLeader() {
        return leader;
    }

    public void setLeader(String leader) {
        this.leader = leader;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }


    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<SysCorp> getChildren() {
        return children;
    }

    public void setChildren(List<SysCorp> children) {
        this.children = children;
    }
}